<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=request.getContextPath()%>/">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
		<style>
			#none{display: none;}
		</style>
<script type="text/javascript" src="Scripts/jquery-1.7.2.js"></script>
</head>
<body>
<form action="headRout/find1" method="get">
请选择时间：<input type="date" name="day">
<input type="submit" value="查询">
</form>
<br>
<form action="headRout/list2" method="get">
请填写周数：<input type="text" name="spar">
<input type="submit" value="查询">
</form>
<input type="button" value="上传行程" onclick="add()">
	<div id="none">	
	<form action="headRout/add" method="get">
	领导名称：<input type="text" name="headName"  id="id1"/><span id="id4"></span><br />
	行程时间：<input type="datetime-local" name="day1"  id="id2"/><span id="id5"></span><br />
	行程内容：<textarea rows="5" cols="40" name="routing" id="id3"></textarea><span id="id6"></span><br />
	行程备注：<textarea rows="2" cols="40" name="other"></textarea><br />
	<input type="hidden" name="creater" value="${emp.empName }">
	<input type="submit" style="display: none;" id="id7"/>
	</form>
	</div>
</body>
</html>
<script>
	function add () {
		$("#none").show();
	}
	$(function  () {
		$("#id1").blur(function () {
			$("#id4").text("");
		if($("#id1").val()==""){
			$("#id4").text("内容不能为空,否则无法提交").css("color","red")
		}
	});
	});
	$(function  () {
		$("#id2").blur(function () {
			$("#id5").text("");
			if($("#id2").val()==""){
				$("#id5").text("内容不能为空，否则无法提交").css("color","red")
			}
	});
	});
	$(function  () {
		$("#id3").blur(function () {
			$("#id6").text("");
			if($("#id3").val()==""){
				$("#id6").text("内容不能为空，否则无法提交").css("color","red")
			}else{
				if ($("#id1").val()!=""&&$("#id2").val()!=""&&$("#id3").val()!="") {
					$("#id7").show()
			}}
	});
	});
</script>
